<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Vmg" rel="Chapter" href="Vmg.html"><title>Vmg.vmg</title>
</head>
<body>
<code class="code"><span class="keyword">let</span>&nbsp;vmg&nbsp;(heading,speed,goodheading)&nbsp;=<br>
&nbsp;&nbsp;<span class="keyword">let</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;int_angle&nbsp;=&nbsp;abs&nbsp;(heading&nbsp;-&nbsp;goodheading)<br>
&nbsp;&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;<span class="keyword">let</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;float_angle&nbsp;=&nbsp;angle_in_degrees_to_angle_in_float&nbsp;int_angle<br>
&nbsp;&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;(cos&nbsp;float_angle)*.speed</code></body></html>